Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(compiler): Drop support for the deprecated <template>. Use… #22783

Closed
wants to merge 1 commit into from

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Mar 15, 2018

<ng-template> instead

BREAKING CHANGE:

The <template> tag was deprecated in Angular v4 to avoid collisions (i.e. when
using Web Components).

This commit removes support for <template>. <ng-template> should be used
instead.

BEFORE:

    <!-- html template -->
    <template>some template content</template>

    # tsconfig.json
    {
      # ...
      "angularCompilerOptions": {
        # ...
        # This option is no more supported and will have no effect
        "enableLegacyTemplate": [true|false]
      }
    }

AFTER:

    <!-- html template -->
    <ng-template>some template content</ng-template>

fixes #22777

@vicb vicb added action: review The PR is still awaiting reviews from at least one requested reviewer breaking changes area: core Issues related to the framework runtime labels Mar 15, 2018
@mary-poppins
Copy link

You can preview 2dd50aa at https://pr22783-2dd50aa.ngbuilds.io/.

@vicb vicb added the target: major This PR is targeted for the next major release label Mar 15, 2018
@mary-poppins
Copy link

You can preview 97afe9b at https://pr22783-97afe9b.ngbuilds.io/.

Copy link
Contributor

@chuckjaz chuckjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No language service change needed.

@vicb vicb added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 15, 2018
@vicb
Copy link
Contributor Author

vicb commented Mar 15, 2018

… `<ng-template>` instead

BREAKING CHANGE:

The `<template>` tag was deprecated in Angular v4 to avoid collisions (i.e. when
using Web Components).

This commit removes support for `<template>`. `<ng-template>` should be used
instead.

BEFORE:

    <!-- html template -->
    <template>some template content</template>

    # tsconfig.json
    {
      # ...
      "angularCompilerOptions": {
        # ...
        # This option is no more supported and will have no effect
        "enableLegacyTemplate": [true|false]
      }
    }

AFTER:

    <!-- html template -->
    <ng-template>some template content</ng-template>
@mary-poppins
Copy link

You can preview aa21409 at https://pr22783-aa21409.ngbuilds.io/.

@vicb
Copy link
Contributor Author

vicb commented Mar 15, 2018

http://test/OCL:189201059:BASE:189225273:1521141098042:c61b3e47
failing tests were already broken (from @alexeagle) - may be we should remove them at some point ?

@mhevery mhevery closed this in 0ebd577 Mar 15, 2018
@vicb vicb deleted the 0314-tpl branch March 20, 2018 21:07
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
… `<ng-template>` instead (angular#22783)

BREAKING CHANGE:

The `<template>` tag was deprecated in Angular v4 to avoid collisions (i.e. when
using Web Components).

This commit removes support for `<template>`. `<ng-template>` should be used
instead.

BEFORE:

    <!-- html template -->
    <template>some template content</template>

    # tsconfig.json
    {
      # ...
      "angularCompilerOptions": {
        # ...
        # This option is no more supported and will have no effect
        "enableLegacyTemplate": [true|false]
      }
    }

AFTER:

    <!-- html template -->
    <ng-template>some template content</ng-template>

PR Close angular#22783
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime breaking changes cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler <template> element support code needs be removed
5 participants